Skip to content

fix: resolve docstring duplication, bare except, and timestamp format issues#112

Open
Jah-yee wants to merge 2 commits intoEverMind-AI:mainfrom
Jah-yee:fix/demo-docstring-bare-except-timestamp
Open

fix: resolve docstring duplication, bare except, and timestamp format issues#112
Jah-yee wants to merge 2 commits intoEverMind-AI:mainfrom
Jah-yee:fix/demo-docstring-bare-except-timestamp

Conversation

@Jah-yee
Copy link

@Jah-yee Jah-yee commented Mar 3, 2026

Good day,

This PR addresses multiple issues to improve code quality and consistency:

Changes

1. Fix #50: Remove duplicate rrf entry in demo docstring

  • demo/utils/simple_memory_manager.py (line 247-251)
  • Removed duplicate "rrf" entry and clarified the description

2. Fix #107: Replace bare except with except Exception

  • src/biz_layer/mem_db_operations.py (line 146)
  • src/infra_layer/adapters/out/search/repository/episodic_memory_milvus_repository.py (line 127)

Reason: Bare except: catches BaseException including KeyboardInterrupt and SystemExit. Using except Exception: preserves fallback behavior while allowing system exceptions to propagate.

3. Fix #48: Enforce ISO 8601 timestamp format

  • Updated src/memory_layer/prompts/en/episode_mem_prompts.py to require strict ISO 8601 format:
    • Required format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS+HH:MM
    • Examples: 2026-01-23T02:19:25Z or 2026-01-23T10:07:00+08:00
    • Explicitly prohibits Chinese characters, weekdays, AM/PM, UTC

Reason: Previous timestamps had inconsistent formats causing parsing issues.

Local Testing

All modified files pass Python syntax validation:

python3 -m py_compile demo/utils/simple_memory_manager.py
python3 -m py_compile src/biz_layer/mem_db_operations.py
python3 -m py_compile src/infra_layer/adapters/out/search/repository/episodic_memory_milvus_repository.py
python3 -m py_compile src/memory_layer/prompts/en/episode_mem_prompts.py

Warmly,
Spark (on behalf of Spark Lab)


感谢你们的奉献,希望能提供帮助。如果我解决得有问题或有待商妥的地方,请在下面留言,我会来处理。

SparkLabScout and others added 2 commits March 3, 2026 04:10
Fixes EverMind-AI#78: Search API now iterates over all requested memory_types instead
of only using the first one.

Changes:
- get_keyword_search_results: now iterates over all supported memory_types
  (EPISODIC_MEMORY, EVENT_LOG, FORESIGHT) and merges results with deduplication
- get_vector_search_results: now iterates over all supported memory_types
  and merges results with deduplication
- For unsupported types (e.g., profile which is stored in MongoDB), logs an
  info message and skips instead of erroring out

Behavior:
- When multiple memory_types are provided, all supported types are searched
- Results are merged and deduplicated by id
- The first memory_type is still used for metrics/logging purposes
… issues

- Fix EverMind-AI#50: Remove duplicate 'rrf' entry in demo docstring
- Fix EverMind-AI#107: Replace bare except with except Exception in mem_db_operations.py
- Fix EverMind-AI#107: Replace bare except with except Exception in episodic_memory_milvus_repository.py
- Fix EverMind-AI#48: Add ISO 8601 timestamp format requirement to episode_mem_prompts.py

All modified files pass Python syntax validation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] two rrf mode in demo code [FEATURE] Inconsistent timestamp formats in episodic memories

1 participant